<template>
	<div style="width: 150%">
		<h3 class="pageTitle">课程信息表管理 </span></h3>
		<hr class="pageTitle" />
		<h4 class="pageTitle">筛选条件 <span class="label label-default">学院</span></h4>
		<div>
			<!-- 加粗 -->
			<b class="pageTitle">所属学院:</b>
			<select class="option">
				<option>全部</option>
				<option>计算机学院</option>
				<option>外国语学院</option>
			</select>
			<b class="pageTitle">所属专业:</b>
			<select class="option">
				<option>全部</option>
				<option>软件工程</option>
				<option>计算机科学与技术</option>
			</select>
			<b class="pageTitle">所属班级:</b>
			<select class="option">
				<option>全部</option>
				<option>软工201</option>
				<option>软工202</option>
				<option>软工203</option>
				<option>软工204</option>
				<option>软工205</option>
			</select>
			<b class="pageTitle">当前年级:</b>
			<select class="option">
				<option>全部</option>
				<option>大一</option>
				<option>大二</option>
			</select>
			<b class="pageTitle">性别:</b>
			<select class="option">
				<option>全部</option>
				<option>男</option>
				<option>女</option>
			</select>
			<b style="margin-left: 100px;">搜索:</b>
			<input type="text" class="search" placeholder="请输入学生基本信息">
			<button type="button" class="btn btn-default">筛选</button>
		</div>
		<hr class="pageTitle" />
		<button type="button" class="btn btn-default pageTitle courseinfo">导入学生信息</button>
		<span class="rightCondition">
			<img src="../../public/img/cloudup.png" />
			<img src="../../public/img/condition.png" style="width: 20px;height: 20px;" />
		</span>
		<br /><br />
		<table class="table table-condensed pageTitle">
			<thead>
				<tr>
					<th>序号</th>
					<th>课程名称</th>
					<th>所属院系</th>
					<th>课程类别</th>
					<th>考试方式</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr v-for="(item,index) in course" :key="index">
					<td>
						<label>
							{{index + 1}}
						</label>
					</td>
					<td>{{item.coursename}}</td>
					<td>{{item.faculty}}</td>
					<td>{{item.category}}</td>
					<td>{{item.score}}</td>
					<td>
						<router-link style="cursor: pointer;" :to="{
						path:'/edu/details',
						query:{
							id:item.id
						}
						}">详情</router-link>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="pageTitle">
			<span class="page">
				共:<i>100</i>条
				<select class="option">
					<option>10条/页</option>
					<option>20条/页</option>
				</select>
				<ul class="pagination pagination-sm page">
					<li><a href="#">&laquo;</a></li>
					<li><a href="#">1</a></li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">5</a></li>
					<li><a href="#">&raquo;</a></li>
				</ul>
				跳转到:<input type="text" style="width: 20px;" /> &nbsp;页 &nbsp;
				<input type="button" value="确定" />
			</span>
		</div>
		<router-view></router-view>
	</div>
</template>

<script>
	import axios from 'axios'
	export default {
		name: 'StuInfo',
		data() {
			return {
				course:''
			}
		},
		//挂载完成查看学生已选课程
		mounted() {
			axios({
				//请求地址
				url: 'http://localhost:8080/axios/queryAllCoursesBySt',
				//请求方式
				method: 'post',
				data: {
					id: 28
				},

			}).then(
				res => {
					this.course = res.data.success
				},
				err => {
					console.log(err.message)
				}
			)
		}
	}
</script>
